<template>
	<view class="xy-goods-row">
		<view class="item flex":style="'background-color: #ffffff;'" @tap="onLink(item.id)">
			<view class="image ovh"><image :src="item.image" class="br-10" /></view>
			<view class="r m-l-20 ">
				<view class="tl tb lh-40 ovh">{{item.title}}</view>
        <view class="c_tags m-t-20"><text  v-for="(t,i) in item.tags">{{t}}</text></view>
				<view class="price-box m-t-15 flex ali-end lh-36">
					<view class="price ts-24 tb m-r-20 " :style="'color:#ff5335;'">
						会员价：¥{{$xyfun.pe(item.price)}}积分
						<text class="line_price ts-18 tdl m-l-20 tn" :style="'color:#808080;'">原价¥{{$xyfun.pe(item.line_price)}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		name: "xyGoodsRow",
		props: {
			item: {
				type: Object,
			}
		},
		data() {
			return {

			};
		},
		methods: {
			async onLink(id){
				this.$Router.push({
					path: '/pages/shop/goods/detail',
					query: {id:id},
				});
			}
		}
	}
</script>
<style lang="scss">
	.xy-goods-row{
    padding: 20rpx;
    background: #fff;
    border-radius: 10rpx;
		.item{
			flex-wrap: nowrap;
      .c_tags{
        text-align: left;
        text{
          border: 1rpx solid  #e54d42;
          color: #e54d42;
          display: inline-block;
          font-size: 18rpx;
          border-radius: 16rpx;
          padding: 4rpx 10rpx;
          margin-right: 10rpx;
        }
      }

      .image {
        flex-shrink: 0;
        width: 152rpx;
        height: 152rpx;

        image {
          width: 152rpx;
          height: 152rpx;
        }
      }

      .r {
        width: 458rpx;
      }

		}
	}
</style>
